#include <QCoreApplication>
#include <iostream>
#include <cmath>
#include <cfloat>
using namespace std;

double sincos(double angle, char edinica); //Прототип

void abc()
{
    cout<<endl<<"Raschet zavershen!";
    int x;
    double b;
    b=3.2;
    x=2;
    cout<<endl<<"x="<<x<<"\t\t b="<<b;
    x=b;
    cout<<endl<<"x=b="<<x<<"\t\t b="<<b;
    b=DBL_MAX;
    x=b;
    cout<<endl<<"x=b="<<x<<"\t b="<<b;
    double t=int(5.9);
    cout<<endl<<t;
}
int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);
    cout<<"Enter angle: "<<endl;
    double angle;
    cin>>angle;
    char e;
    cout<<"(d/r)";
    cin>>e;
    cout<<"resultat: "<<sincos(angle,e);
    abc();
    return a.exec();
}

double sincos(double angle,char edinica)
{
    if (edinica=='d')
    {
      angle=angle*M_PI/180.0;
      return sin(angle)*cos(angle);
    }
    else if (edinica=='r')
    {
      return sin(angle)*cos(angle);
    }
    return sin(angle)*cos(angle);
}
